# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
	include CurrentUserHelper

  # See ActionController::RequestForgeryProtection for details
  # Uncomment the :secret if you're not using the cookie session store
  #protect_from_forgery :secret => '016acd17b1ffd80fc16d145fb94dc685'
  
  # See ActionController::Base for details 
  # Uncomment this to filter the contents of submitted sensitive data parameters
  # from your application log (in this case, all fields with names like "password"). 
  filter_parameter_logging :password

	protected
	def rescue_action_in_public(exception)
    flash[:error] = exception.message
		logger.error(exception.message)
    redirect_to error_url
	end
	
	def local_request?
		false
	end
end
